package org.example.seckill;

import org.apache.rocketmq.client.exception.MQClientException;
import org.apache.rocketmq.client.producer.DefaultMQProducer;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;

@SpringBootApplication
@MapperScan("org.example.seckill.dao")
public class WebApplication {

    public static void main(String[] args) {
        SpringApplication.run(WebApplication.class, args);
    }

//    @Bean
//    public DefaultMQProducer getMqProducer() throws MQClientException {
//        DefaultMQProducer producer = new DefaultMQProducer("seckill_create_order_01");
//        producer.setNamesrvAddr("localhost:9876");
//        producer.start();
//
//        return producer;
//    }
}
